import React, { Component } from "react";
import MainLayout from "@component/mainLayout/mainLayout";
import Button from "@component/button/index";
import "../../../font/iconfont/iconfont.css";
import "./contractSuccess.scss";
import BankIcon from "@images/contractStates/success.png";

class ContractSuccess extends Component {
	constructor(props) {
		super(props);
		this.state = {};
	}
	overClick = () => {
		this.props.history.replace("/xhbBalanceAccountOpened");
	};
	render() {
		const _pageParams = {
			header: {
				title: "支付签约",
				goBackPath: "/xhbBalanceAccountOpened",
				goBackAction: this.overClick
			},
			history: this.props.history,
			cacheLifecycles: this.props.cacheLifecycles
		};
		return (
			<MainLayout pageParams={_pageParams}>
				<div className="contractStatusCont">
					<div className="contractStatus">
						<img src={BankIcon} alt="" className="add-icon" />
					</div>
					<div className="info">
						<i className="iconfont contractSuccess">&#xe6af;</i>
						<div>支付功能已开通</div>
					</div>
					<Button onClick={this.overClick} className="contractBtn">
						完成
					</Button>
				</div>
			</MainLayout>
		);
	}
}

export default ContractSuccess;
